Skip to content

[Release] Automate most manual steps#9419

Merged
acstll merged 6 commits into
elastic:mainfrom
acstll:feat/release-automation
Apr 30, 2026
Merged

[Release] Automate most manual steps#9419
acstll merged 6 commits into
elastic:mainfrom
acstll:feat/release-automation

Conversation

@acstll
Copy link
Copy Markdown
Contributor

@acstll acstll commented Mar 2, 2026

Summary

This PR adds 2 scripts to automate some of the manual steps involved in the release process.

  • yarn release:prep helps create the release PR
  • yarn release:publish adds the git tag and triggers the workflow, once the PR has been merged

TODO

  • add a step at the very end to create the "release" in GitHub using gh as well
  • add a "dirty worktree" check before pushing in the prep script, and probably prompt the user about that to do…

Note

I used this script for the v113.1.0 release

Why are we making this change?

To save time and prevent errors.

Important

I'm happy to close this if you don't think this is a good idea or has little value

Screenshots

Screenshot 2026-02-23 at 17 22 51

Impact to users

None, internal.

QA

The one (and probably only) way to test this is to actually use it for a real release. If you're feeling adventurous, you can run the script below to get the scripts installed on your .local/bin folder, so you can run them standalone…

bash <(curl -s https://raw.githubusercontent.com/acstll/eui/feat/release-automation/scripts/release-install.sh)

then from the eui root:

release-prep.sh

to create the release PR, and then

release-publish.sh

to publish.

@acstll acstll self-assigned this Mar 2, 2026
@acstll acstll added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Mar 2, 2026
@weronikaolejniczak
Copy link
Copy Markdown
Contributor

I'm happy to close this if you don't think this is a good idea or has little value

This is absolutely a good idea and has great value, Arturo! It's a great call and I'm happy you found time to do this during support week ❤️ Is there anything I can do to push this forward? Do you need a pre-review?

Comment thread scripts/release-publish.sh Outdated
step "1/5" "Updating main branch..."
git checkout main
git pull upstream main

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably also do git fetch upstream --tags here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in efb7da0

acstll and others added 3 commits April 15, 2026 13:40
- Add dirty worktree checks to prep script
- Add `git fetch upstream --tags` to publish script
- Add GitHub release creation step with changelog extraction
- Extract shared package list to variable
- Trim verbose comments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows trying the release scripts locally without checking out
the branch, via curl one-liner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@acstll acstll marked this pull request as ready for review April 15, 2026 12:00
@acstll acstll requested a review from a team as a code owner April 15, 2026 12:00
Copilot AI review requested due to automatic review settings April 15, 2026 12:00
@acstll acstll changed the title [DRAFT] Automate some manual release steps [Release] Automate most manual steps Apr 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds internal automation scripts to streamline EUI’s official release flow by reducing manual git/GitHub CLI steps.

Changes:

  • Add scripts/release-prep.sh to create a release branch and open a release PR after running the release CLI in dry-run mode.
  • Add scripts/release-publish.sh to tag the merged release commit, trigger the release.yml workflow, and create a GitHub release.
  • Add scripts/release-install.sh plus package.json yarn scripts to make running these workflows easier.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
scripts/release-prep.sh Automates pre-release PR creation steps (branching, release CLI dry run, PR creation).
scripts/release-publish.sh Automates post-merge publish steps (tagging, workflow trigger, GitHub release creation).
scripts/release-install.sh Convenience installer to place scripts into ~/.local/bin.
package.json Adds yarn release:prep and yarn release:publish script entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/release-publish.sh
Comment thread scripts/release-publish.sh
Comment thread scripts/release-prep.sh
Comment thread scripts/release-install.sh Outdated
@weronikaolejniczak weronikaolejniczak requested review from weronikaolejniczak and removed request for weronikaolejniczak April 24, 2026 08:50
Comment thread scripts/release-install.sh Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably delete this file before merging. We can't use personal forks, gists, and other resources for such purposes, because they could expire someday, and are a short path to pwning someone internal

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're completely right, that was the intention but i didn't flag it and i had forgotten myself haha, removed it 0588968

PREV_TAG=$(git describe --tags --abbrev=0 "${MERGE_SHA}^" 2>/dev/null) || error "Could not find a previous release tag"

# Detect changed workspaces and collect changelog entries for the GitHub release
CHANGED_WORKSPACES=""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: You can now get it directly from .release/published_packages.json, but I'm happy to leave it as-is for the time being

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do so, and of course use the new .release/published_packages.json when porting to CI ✨

Copy link
Copy Markdown
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm adding a "request changes" review just to prevent merging before release-install.sh is removed. I'll approve straight after!

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @acstll

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @acstll

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@acstll acstll enabled auto-merge (squash) April 30, 2026 10:12
@acstll acstll disabled auto-merge April 30, 2026 11:46
@acstll acstll enabled auto-merge (squash) April 30, 2026 16:39
@acstll acstll merged commit 9794ee4 into elastic:main Apr 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants